Problem Note 33468: NLDATE informat not reading data correctly
The NLDATEw. informat reads the date value in the specified locale, and then converts the date value to the local SAS date value.
The NLDATEw. informat doesn't work correctly with a
single digit day unless a space is inserted prior to the day value.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9 TS M0 | 9.3 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9 TS M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9 TS M0 | 9.3 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
Microsoft Windows 2000 Server | 9 TS M0 | |
Microsoft Windows 2000 Professional | 9 TS M0 | |
Microsoft Windows NT Workstation | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9 TS M0 | 9.3 TS1M0 |
64-bit Enabled AIX | 9 TS M0 | 9.3 TS1M0 |
64-bit Enabled HP-UX | 9 TS M0 | 9.3 TS1M0 |
64-bit Enabled Solaris | 9 TS M0 | 9.3 TS1M0 |
HP-UX IPF | 9 TS M0 | 9.3 TS1M0 |
Linux | 9 TS M0 | 9.3 TS1M0 |
OpenVMS Alpha | 9 TS M0 | 9.3 TS1M0 |
Tru64 UNIX | 9 TS M0 | 9.3 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The single digit day for Y causes "invalid argument" message and a missing value for a result. In order to read the value inside Y correctly, an extra space has to be inserted before the day value of 3.
data;
x=input('September 10, 2006',nldate18.);
y=input('September 3, 2006',nldate17.);
z=input('September 3, 2006',nldate18.);
put x= y= z=;
run;
/* This is the log when the extra space isn't inserted before the
single digit day.
*/
133 data;
134 x=input('September 10, 2006',nldate18.);
135 y=input('September 3, 2006',nldate17.);
136 z=input('September 3, 2006',nldate18.);
137 put x= y= z=;
138 run;
NOTE: Invalid argument to function INPUT at line 135 column 13.
x=17054 y=. z=17047
x=17054 y=. z=17047 _ERROR_=1 _N_=1
NOTE: Mathematical operations could not be performed at the following places. The results of the
operations have been set to missing values.
/* When the extra space is inserted prior to the 3, this is the
log.
*/
x=17054 y=17047 z=17047
Type: | Problem Note |
Priority: | |
Topic: | SAS Reference ==> Informats ==> Date and Time ==> NLDATE
|
Date Modified: | 2011-06-01 13:06:36 |
Date Created: | 2008-09-30 09:30:56 |